 <div class="navbar navbar-fixed-top navbar-inverse simple">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?php echo $this->baseUrl?>">Hàng về</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <ul class="nav navbar-nav">
                <li>
                    <a class="<?php if(!$this->user):?>require-login<?php endif?>" href="<?php echo $this->createUrl('/hangve/post/create');?>">
                        <i class="fa fa-pencil-square-o"></i> Đăng tin rao vặt</a>
                </li>
                <?php /*
                <li>
                    <a class="<?php if(!$this->user):?>require-login<?php endif?>" href="<?php echo $this->createUrl('/hangve/post/createShop');?>">
                        <i class="fa fa-shopping-cart"></i> Tạo gian hàng</a>
                </li>
                */?>
            </ul>


            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown hidden-lg hidden-md visible-sm visible-xs">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-folder-open"></i> Chuyên mục <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu medium cats">
                        <?php foreach(PostCat::model()->getDataAll() as $catData):?>
                            <li>

                                <a class="<?php if($this->catSelected == $catData['alias']):?>active<?php endif?>" href="<?php echo $catData['url']?>">
                                    <i class="fa fa-<?php echo $catData['icon'];?> fa-border fa-fw small"></i> <?php echo $catData['name']?>
                                    <span class="badge pull-right"><?php echo $catData['post_count']?></span>
                                </a>

                            </li>
                            <?php endforeach;?>
                    </ul>
                </li>

                <li class="dropdown user">  
                    <?php if($this->user):?>
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-user"></i> <?php echo $this->user->name?> <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu medium">
                            <li><a href="<?php echo $this->createUrl('/user/page/update')?>"><i class="fa fa-thumbs-o-up fa-border fa-fw small"></i> Cập nhật tài khoản</a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/managePhone')?>"><i class="fa fa-phone fa-border fa-fw small"></i> Quản lý SĐT</a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/manageEmail')?>"><i class="fa fa-envelope-o fa-border fa-fw small"></i> Quản lý Email & Openid</a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/password')?>"><i class="fa fa-ellipsis-h fa-border fa-fw small"></i> <?php echo $this->user->password ? 'Đổi mật khẩu' : 'Tạo mật khẩu'?></a></li>
                            <li><a href="<?php echo $this->createUrl('/user/page/VerifyPhone')?>"><i class="fa fa-phone-square fa-border fa-fw small"></i> Xác nhận SĐT</a></li>
                            <li class="divider"></li>
                            <li class="text-right"><a href="<?php echo $this->createUrl('/user/page/logout')?>">Thoát <i class="fa fa-sign-out fa-border fa-fw small text-danger"></i></a></li>
                        </ul>
                    <?php else:?>
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-sign-in"></i> Đăng nhập <b class="caret"></b>
                        </a>
                        <div class="dropdown-menu">

                            <div class="col-md-24">     
                                <form role="form" action="<?php echo $this->createUrl('/user/page/login')?>" method="post" style="min-width: 250px;">
                                    <div class="form-group">
                                        <label for="LoginFormNav_username" class="control-label required">Email/Số ĐT <span class="required">*</span></label>
                                        <input class="form-control input-sm" type="text" id="LoginFormNav_username" name="LoginForm[username]" maxlength="255" placeholder="Email/Số ĐT">
                                    </div>
                                    <div class="form-group">
                                        <label for="LoginFormNav_password" class="control-label required">Mật khẩu <span class="required">*</span></label>
                                        <input class="form-control input-sm" type="password" id="LoginFormNav_password" name="LoginForm[password]" maxlength="255" placeholder="Mật khẩu">
                                    </div>
                                    <div class="form-group">
                                        <button class="btn btn-primary btn-sm" type="submit">
                                            <i class="fa fa-sign-in"></i> Đăng nhập
                                        </button>
                                        <div class="pull-right">
                                            <a href="<?php echo $this->createUrl('/user/page/login', array('service' => 'facebook'))?>" data-trigger="hover" data-placement="top" rel="tooltip" class="openid_popup decoration-none" title="Đăng nhập tài khoản Facebook">
                                                <i class="fa fa-facebook-square fa-2x text-primary"></i>
                                            </a>
                                            <a href="<?php echo $this->createUrl('/user/page/login', array('service' => 'google'))?>" data-trigger="hover" data-placement="top" rel="tooltip" class="openid_popup decoration-none" title="Đăng nhập bằng tài khoản Google">
                                                <i class="fa fa-google-plus-square fa-2x text-danger"></i>
                                            </a>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <a href="<?php echo $this->createUrl('/user/page/create')?>" class="decoration-none" rel="tooltip" data-placement="top" title="Đăng ký tài khoản mới">
                                            <span class="label label-success"><i class="fa fa-pencil-square-o"></i> Đăng ký</span>
                                        </a>
                                        <a href="<?php echo $this->createUrl('/user/page/forgot')?>" class="decoration-none" rel="tooltip" data-placement="top" title="Bạn không nhớ mật khẩu của mình ?">
                                            <span class="label label-warning"><i class="fa fa-retweet"></i> Quên mật khẩu</span>
                                        </a>
                                    </div>
                                </form>

                            </div>
                        </div>
                    <?php endif?>
                </li>

            </ul>
        </div><!-- /.navbar-collapse -->
    </div>
</div>